package com.sali.commons.config;

import com.sali.commons.utils.PropertiesUtil;

import java.util.Properties;

/**
 * @description: 封装配置项
 * @author: sali
 * @date: 2025/3/2 下午1:05.
 * @version: 1.0
 */
public class TaskConfig {

    private static final String CONFIG_FILE = "application.properties";

    public static final Properties prop;

    static {
        prop = PropertiesUtil.load(CONFIG_FILE);
    }


    public static final int STATISTIC_LOG_PRINT_INTERVAL = Integer.parseInt(prop.getProperty("statistic.log.print.interval", "5"));


    public static final boolean STATISTIC_LOG_DETAIL = Boolean.parseBoolean(prop.getProperty("statistic.log.detail", "false"));

    // 实时数据处理线程数量
    public static final Integer REALTIME_PROCESS_THREAD_NUM = Integer.parseInt(prop.getProperty("realtime.process.thread.num", "1"));

    // 实时处理流程配置文件路径
    public static String REALTIME_PROCESS_CONFIG_PATH = prop.getProperty("realtime.process.config.path", "");

    // 入口文件路径
    public static String DATA_ENTRY_FILE_PATH = prop.getProperty("data-entry.file-listener.path", "");

    // 引用计数检查时间间隔，单位ms
    public static final long REFERENCE_COUNT_INTERVAL = Long.parseLong(prop.getProperty("ref.count.interval", "50"));
}
